
export default {
    state: () => ({
        uploadImages: [],
        uploadFiles: []
    }),
    getters: {
        uploadImages: state => state.uploadImages,
        uploadFiles: state => state.uploadFiles
    },
    mutations: {
        setUploadImages(state, images = []) {
            state.uploadImages = []
            state.uploadImages = images
        },
        setUploadFiles(state, files = []) {
            state.files = []
            state.files = files
        }
    },
    actions: {
        async updateUploadImages({ commit }, images = []) {
            commit('setUploadImages', images)
        },
        async updateUploadFiles({ commit }, files = []) {
            commit('setUploadFiles', files)
        }
    }
}
